﻿package src.nhutto.taskLine {		import flash.display.MovieClip;	import flash.display.DisplayObject;	import flash.utils.Timer;	import flash.events.TimerEvent;	import flash.events.MouseEvent;			public class Scrollers extends MovieClip {		private var speed:Number = 5;		private var dir:Number = 0;		private var timer:Timer = new Timer(1,0);				public function Scrollers(targetObj:DisplayObject, dirUp:Boolean) {			if(dirUp){				removeChild(downArrow);				dir = 1;			}else{				removeChild(upArrow);				dir = -1;			}			timer.addEventListener(TimerEvent.TIMER,function(e):void{								   if(targetObj.y+speed*dir<(stage.stageHeight/2) && targetObj.y+speed*dir>(stage.stageHeight/2)-targetObj.height){									   targetObj.y+= speed*dir;								   }								   });			addEventListener(MouseEvent.MOUSE_DOWN, function(e):void{ timer.start(); });			addEventListener(MouseEvent.MOUSE_UP, function(e):void{ timer.stop(); });					}	}	}